#include <assert.h>
#include "cpu.h"

int main()
{
	CPU Proc;
	CPU_construct( &Proc );
	DOUT( "CPU construction OK" );

	CPU_Load( Proc, "code.txt" );
	DOUT( "Program read OK" );

	DOUT( "" );

	DLN for( int i = 0; i < PROG_SZ; i++ ) {
		if( Proc.program[i] == 0 )
			break;
		else
			printf( "%d, ", Proc.program[i] );
	}

	CPU_Run( Proc );
	DOUT( "CPU performed OK" );

	CPU_destruct( &Proc );
	DPUTCLOSURE;
	return 0;
}


